home *** CD-ROM | disk | FTP | other *** search
/ Graphics Plus / Graphics Plus.iso / x / animutil / xanim229.lha / xanim / xanim_iff.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-01-08  |  3.1 KB  |  165 lines

  1.  
  2. /*
  3.  * xanim_iff.h
  4.  *
  5.  * Copyright (C) 1990,1991,1992 by Mark Podlipec. 
  6.  * All rights reserved.
  7.  *
  8.  * This software may be freely copied, modified and redistributed
  9.  * without fee provided that this copyright notice is preserved 
  10.  * intact on all copies and modified copies.
  11.  * 
  12.  * There is no warranty or other guarantee of fitness of this software.
  13.  * It is provided solely "as is". The author(s) disclaim(s) all
  14.  * responsibility and liability with respect to this software's usage
  15.  * or its effect upon hardware or computer systems.
  16.  *
  17.  */
  18. /* flags */
  19. extern int verbose;
  20.  
  21. /* variables */
  22. extern int imagex;
  23. extern int imagey;
  24. extern int imagec;
  25. extern int imaged;
  26.  
  27. /* technically iff 
  28. #define CMAP_SIZE 256
  29. typedef struct
  30. {
  31.  UBYTE red,green,blue;
  32. } ColorReg;
  33. extern ColorReg cmap[256];
  34. */
  35.  
  36. typedef struct 
  37. {
  38.  LONG id;
  39.  LONG size;
  40. } Chunk_Header;
  41.  
  42. /* Graphic Stuff */
  43. #define ANHD 0x414e4844
  44. #define ANIM 0x414e494d
  45. #define ANSQ 0x414e5351
  46. #define BMHD 0x424d4844
  47. #define BODY 0x424f4459
  48. #define CAMG 0x43414d47
  49. #define CMAP 0x434d4150
  50. #define CRNG 0x43524e47
  51. #define DLTA 0x444c5441
  52. #define DPAN 0x4450414e
  53. #define DPPS 0x44505053
  54. #define DPPV 0x44505056
  55. #define FORM 0x464f524d
  56. #define GRAB 0x47524142
  57. #define ILBM 0x494c424d
  58.  
  59. /* Grouping Stuff */
  60. #define LIST 0x4c495354
  61. #define PROP 0x50524f50
  62. #define FACE 0x46414345
  63.  
  64. /* Sound stuff */
  65. #define VHDR 0x56484452
  66. #define ANNO 0x414e4e4f
  67. #define CHAN 0x4348414e
  68.  
  69.  
  70. typedef struct
  71. {
  72.  UWORD width, height;
  73.  WORD x, y;
  74.  UBYTE depth;
  75.  UBYTE masking;
  76.  UBYTE compression;
  77.  UBYTE pad1;
  78.  UWORD transparentColor;
  79.  UBYTE xAspect, yAspect;
  80.  WORD pageWidth, pageHeight;
  81. } Bit_Map_Header;
  82.  
  83. #define BMHD_COMP_NONE 0L
  84. #define BMHD_COMP_BYTERUN 1L
  85.  
  86. #define BMHD_MSK_NONE 0L
  87. #define BMHD_MSK_HAS 1L
  88. #define BMHD_MSK_TRANS 2L
  89. #define BMHD_MSK_LASSO 3L
  90.  
  91. #define mskNone                 0
  92. #define mskHasMask              1
  93. #define mskHasTransparentColor  2
  94. #define mskLasso                3
  95.  
  96. #define cmpNone      0
  97. #define cmpByteRun1  1
  98.  
  99. /* Aspect ratios: The proper fraction xAspect/yAspect represents the pixel
  100.  * aspect ratio pixel_width/pixel_height.
  101.  *
  102.  * For the 4 Amiga display modes:
  103.  *   320 x 200: 10/11  (these pixels are taller than they are wide)
  104.  *   320 x 400: 20/11
  105.  *   640 x 200:  5/11
  106.  *   640 x 400: 10/11      */
  107. #define x320x200Aspect 10
  108. #define y320x200Aspect 11
  109. #define x320x400Aspect 20
  110. #define y320x400Aspect 11
  111. #define x640x200Aspect  5
  112. #define y640x200Aspect 11
  113. #define x640x400Aspect 10
  114. #define y640x400Aspect 11
  115.  
  116.  
  117. typedef struct
  118. {
  119.  UWORD width,height;
  120.  WORD x, y;
  121.  WORD xoff, yoff;
  122. } Face_Header;
  123.  
  124.  
  125.  
  126. typedef struct 
  127. {
  128.  LONG id;
  129.  LONG size;
  130.  LONG subid;
  131. } Group_Header;
  132.  
  133. typedef struct 
  134. {
  135.  LONG id;
  136.  LONG size;
  137.  LONG subid;
  138.  UBYTE grpData[ 1 ];
  139. } Group_Chunk;
  140.  
  141. typedef struct
  142. {
  143.  UBYTE op;
  144.  UBYTE mask;
  145.  UWORD w,h;
  146.  UWORD x,y;
  147.  ULONG abstime;
  148.  ULONG reltime;
  149.  UBYTE interleave;
  150.  UBYTE pad0;
  151.  ULONG bits;
  152.  UBYTE pad[16];
  153. } Anim_Header;
  154. #define Anim_Header_SIZE 40
  155.  
  156. extern void IFF_Read_File();
  157. extern void IFF_HAM_To_332();
  158. extern void IFF_Delta5();
  159. extern void IFF_Delta3();
  160. extern void IFF_Deltal();
  161. extern int IFF_DeltaJ();
  162. extern int Is_IFF_File();
  163. extern int UnPackRow();
  164.  
  165.